home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Tracker Coordinates.2 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.3 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Tracker Coordinates
  2. Sent:        6/6/96 10:24 AM
  3. Received:    6/6/96 10:41 AM
  4. From:        Bill Finzer, bfinzer@mail.keypress.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Subject:  RE>>Tracker Coordinates           Time: 10:25 AM    Date:6/6/96
  9.  
  10. > >As near as I can tell, the FW_CTracker::Track method is inconsistent in
  11. terms
  12. > >of the mouse coordinates it passes in its call to BeginTracking and then
  13. to
  14. > >ContinueTracking.
  15. > >
  16. > >In BeginTracking, the point passed in is in view _content_ coordinates.
  17. > >Whereas in ContinueTracking the current location point passed in is in
  18. view
  19. > >coordinates.
  20. > >
  21. > >Shouldn't both of them be in view coordinates?
  22. > I looked at the code and both are in view content coordinates. 
  23. > BeginTracking is called with the a point converted using 
  24. > FrameToViewContent. The point passed to ContinueTracking is also in view 
  25. > Content coordinates. FW_GetMouseLocation calls ::GetMouse and then 
  26. > converts the point to the logical coordinates of the current graphic 
  27. > context (theGC.DeviceToLogical(..)). In this case the view content 
  28. > coordinates.
  29. > FW_CTracker::Track is used in both ODFDraw and ODFContainer which are 
  30. > both supporting scrolling. If there was a bug, the tracker would not be 
  31. > working correctly in a scrolled view.
  32. > ........................................................................
  33. >  Henri Lamiraux                                      lamiraux@apple.com
  34. >  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  35. > ........................................................................
  36.  
  37. Well then perhaps my problem has to do with the difference between view
  38. coordinates and view _content_ coordinates.
  39.  
  40. My situation is that I have a content view whose coordinates are the same as
  41. the frame. I have a subview of the content view located at (say) (20, 200,
  42. 200, 220) in view content coordinates. I click the mouse near the left top of
  43. this subview. What I observe in the debugger is that in BeginTracking,
  44. anchorPoint is about (25, 205) but that the currentPoint passed in to
  45. ContinueTracking is (5, 5).
  46.  
  47. When I trace theGC.DeviceToLogical(..) it _does_ seem to convert to _view_
  48. coordinates as opposed to view _content_ coordinates.
  49.  
  50. Am I confused, or what?
  51.  
  52. Thanks,
  53. Bill Finzer
  54.